package com.woniu.user.service.impl;

import com.woniu.common.entity.User;
import com.woniu.user.entity.Message;
import com.woniu.user.mapper.MessageMapper;
import com.woniu.user.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author author
 * @create 2021/5/20
 */
@Service
public class MessageServiceImpl implements MessageService {

    @Autowired
    MessageMapper messageMapper;

    @Override
    public List<Message> selectAllMessage() {
        return messageMapper.selectAllMessage();
    }

    @Override
    public boolean addMessage(Message message) {
        return messageMapper.insertMessage(message);
    }

    @Override
    public User selectUser(String name) {
        return messageMapper.selectUser(name);
    }
}
